package com.xhblog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author pengyouhong
 * create 2022/5/17 18:11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "xh_blog.ms_article")
public class Article implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 评论数量
     */
    @TableField(value = "comment_counts")
    private Integer commentCounts;

    /**
     * 创建时间
     */
    @TableField(value = "create_date")
    private Long createDate;

    /**
     * 简介
     */
    @TableField(value = "summary")
    private String summary;

    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 浏览数量
     */
    @TableField(value = "view_counts")
    private Integer viewCounts;

    /**
     * 是否置顶
     */
    @TableField(value = "weight")
    private Integer weight;

    /**
     * 作者id
     */
    @TableField(value = "author_id")
    private Long authorId;

    /**
     * 内容id
     */
    @TableField(value = "body_id")
    private Long bodyId;

    /**
     * 类别id
     */
    @TableField(value = "category_id")
    private Integer categoryId;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_COMMENT_COUNTS = "comment_counts";

    public static final String COL_CREATE_DATE = "create_date";

    public static final String COL_SUMMARY = "summary";

    public static final String COL_TITLE = "title";

    public static final String COL_VIEW_COUNTS = "view_counts";

    public static final String COL_WEIGHT = "weight";

    public static final String COL_AUTHOR_ID = "author_id";

    public static final String COL_BODY_ID = "body_id";

    public static final String COL_CATEGORY_ID = "category_id";
}